<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>JavaScript 算数</title>
</head>
<body>
<h1>-- 运算符</h1>

<p id="demo"></p>
<script>
  var x=2;
  x--;
  var z=x;
  document.getElementById("demo").innerHTML=z;
</script>

</body>
</html>